feat: support Arguments for Lambda when query language is JSONata#645
Merged
Conversation
2eee05a to
73cc27b
Compare
Arguments for Lambda when query language is JSONata
zirkelc
reviewed
Apr 1, 2025
zirkelc
approved these changes
Apr 1, 2025
|
Hello, any idea when this change will be released ? |
Collaborator
|
@PaulBanusIAD that is up to @horike37 |
zirkelc
reviewed
May 1, 2025
Collaborator
|
Hey @edvaldoszy I found one more mistake, please correct this then we can get this merged |
Collaborator
|
I extended the test |
|
HI just wonder any plan to release it PR as new version? |
Collaborator
|
🎉 This PR is included in version 3.23.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
olivierto
pushed a commit
to olivierto/serverless-step-functions
that referenced
this pull request
Nov 14, 2025
…erverless-operations#645) * fix: correctly resolve lambda function name from Arguments or Parameters * test: use itParam to test both JSONPath and JSONata scenarios * fix: lambda permissions for jsonata --------- Co-authored-by: zirkelc <chris.zirkel@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When using JSONata as the query language, AWS creates the step definition with
Argumentsinstead ofParameters.Example:
Step name: Type: Task Resource: arn:aws:states:::lambda:invoke Output: '{% $states.result.Payload %}' - Parameters: + Arguments: FunctionName: <function ARN goes here> Payload: '{% $states.input %}'That leads to the error below
Deploying "project-name" to stage "staging" (us-east-1) Layer sharp is already uploaded. ✖ Stack staging-project-name failed to deploy (7s) ✖ TypeError: Cannot read properties of undefined (reading 'FunctionName') at ServerlessStepFunctions.getLambdaPermissions (/home/edvaldo/project-name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:365:41) at /home/edvaldo/project-name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:775:47 at arrayMap (/home/edvaldo/project-name/node_modules/lodash/lodash.js:653:23) at map (/home/edvaldo/project-name/node_modules/lodash/lodash.js:9622:14) at Function.flatMap (/home/edvaldo/project-name/node_modules/lodash/lodash.js:9325:26) at ServerlessStepFunctions.getIamPermissions (/home/edvaldo/project-name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:714:12) at /home/edvaldo/project-name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:873:56 at Array.forEach (<anonymous>) at ServerlessStepFunctions.compileIamRole (/home/edvaldo/project-name/node_modules/serverless-step-functions/lib/deploy/stepFunctions/compileIamRole.js:861:32) at ServerlessStepFunctions.tryCatcher (/home/edvaldo/project-name/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/home/edvaldo/project-name/node_modules/bluebird/js/release/promise.js:547:31) at Promise._settlePromise (/home/edvaldo/project-name/node_modules/bluebird/js/release/promise.js:604:18) at Promise._settlePromiseCtx (/home/edvaldo/project-name/node_modules/bluebird/js/release/promise.js:641:10) at _drainQueueStep (/home/edvaldo/project-name/node_modules/bluebird/js/release/async.js:97:12) at _drainQueue (/home/edvaldo/project-name/node_modules/bluebird/js/release/async.js:86:9) at Async._drainQueues (/home/edvaldo/project-name/node_modules/bluebird/js/release/async.js:102:5)Serverless Framework Version:
4.9.1Serverless Step Function Version:
^3.22.0Operating System: Windows with WSL